﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Labiliry
    {
        private string name;
        private int age;
        private char sex;

        public string Name
        {
            get { return this.name; }
            set {
                if (value == "卢本伟")
                {
                    Console.WriteLine("名字太牛逼了");
                }
                else
                {
                    this.name = value;
                }
            }
        }
        public int Age
        {
            get { return this.age; }
            set {
                if (value < 0)
                {
                    Console.WriteLine("年龄错误");
                }
                else
                {
                    this.age = value;
                }
            }
        }
        public char Sex
        {
            get { return this.sex; }
            set { this.sex = value; }
        }
        public void SayFuck()
        {
            Console.WriteLine("图书馆的用户名为{0}，年龄为{1}，性别为{2}",this.name,this.age,this.sex);
        }
    }
}
